package com.site.springboot.core.service;

import com.site.springboot.core.entity.News;
import com.site.springboot.core.entity.NewsExcelVO;
import com.site.springboot.core.util.PageQueryUtil;
import com.site.springboot.core.util.PageResult;

import java.util.List;

public interface NewsService {
    String saveNews(News news);

    PageResult getNewsPage(PageQueryUtil pageUtil);

    Boolean deleteBatch(Integer[] ids);

    /**
     * 根据id获取详情
     *
     * @param newsId
     * @return
     */
    News queryNewsById(Long newsId);

    /**
     * 后台修改
     *
     * @param news
     * @return
     */
    String updateNews(News news);
    /*
    * 获得前十条新闻和十条最新评论
    * */
    PageResult  getNewsAndCommnetOrder(PageQueryUtil pageUtil);

    PageResult getNewsAndComPage(PageQueryUtil pageUtil);

    List<NewsExcelVO> getData();

    List<News> queryAll();

}
